//
//  FQXmppTool.h
//  WeChat
//
//  Created by 方桥 on 16/5/13.
//  Copyright © 2016年 方桥. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "XMPPFramework.h"
#import "Singleton.h"
typedef enum {
    XMPPResultTypeLoginSucess,//登录成功
    XMPPResultTypeLoginFailure,//登录失败
    XMPPResultTypeRegisterSucess,//注册成功
    XMPPResultTypeRegisterFailure//注册失败
}XMPPResultType;

/**
 *  与服务器交互的结果
 */
typedef void (^XMPPResultBlock)(XMPPResultType resultType);


@interface FQXmppTool : NSObject
singleton_interface(FQXmppTool)
/**电子名片模块*/
@property (nonatomic,strong,readonly) XMPPvCardTempModule *vCard;
/**电子名片数据存储*/
@property (nonatomic,strong,readonly) XMPPvCardCoreDataStorage *vCardStorage;
/**花名册*/
@property(strong,nonatomic,readonly)XMPPRoster *roster;
/**花名册数据存储*/
@property(strong,nonatomic,readonly)XMPPRosterCoreDataStorage *rosterStorage;
/**电子名片头像*/
@property(strong,nonatomic,readonly)XMPPvCardAvatarModule *avatar;
/**与服务器交互的核心类*/
@property(strong,nonatomic,readonly)XMPPStream *xmppStream;
/**消息模块*/
@property(strong,nonatomic,readonly)XMPPMessageArchiving *msgArchiving;
/**消息模块数据存储*/
@property(strong,nonatomic,readonly)XMPPMessageArchivingCoreDataStorage *msgArchivingStorage;

/**
 *  标示是注册连接还是登录连接
 *  YES表示注册连接
 *  NO表示登录连接
 */
@property (nonatomic,assign,getter=isRegisterOperation) BOOL registerOperation;
/**
 *  XMPP用户登录
 */
-(void)xmppLogin:(XMPPResultBlock)resultBlock;
/**
 *  XMPP用户注册
 */
-(void)xmppRegister:(XMPPResultBlock)resultBlock;
/**
 *  XMPP用户注销
 */
-(void)xmppLogout;


@end
